$('#btn_login').click(function () {
    var username = $('#username').val().trim();
    var password = $('#password').val().trim();
    // console.log("username" + username);
    // console.log("password" + password);
    $.ajax({
        url: "login",
        type: "post",
        data: {"username": username, "password": password},
        dataType: "JSON",
        success: function (result) {
            // alert("请求成功");
            // console.log("username" + username);
            // console.log("password" + password);
            alert("请求成功");
            alert(JSON.stringify(result.data));
        },
        error: function (result) {
            // console.log("username" + username);
            // console.log("password" + password);
            alert("失败");
        }

    })
})